home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / Time.c < prev    next >
C/C++ Source or Header  |  1992-08-18  |  415b  |  26 lines

  1. static char rcsid [] = "$Id: Time.c,v 1.4 1992/05/05 13:19:05 grosch rel $";
  2.  
  3. # include "Time.h"
  4. # include <stdio.h>
  5. # include "System.h"
  6.  
  7. static int old = 0;
  8.  
  9. int StepTime ()
  10. {
  11.    int new = Time ();
  12.    int result = new - old;
  13.    old = new;
  14.    return result;
  15. }
  16.  
  17. void WriteStepTime
  18. # ifdef __STDC__
  19.    (char * string)
  20. # else
  21.    (string) char * string;
  22. # endif
  23. {
  24.    (void) printf ("%s %5d\n", string, StepTime ());
  25. }
  26.